package com.example.weblending.domain.statistics;

import lombok.Data;

import java.util.List;
import java.util.Random;

/**
 * 成功率统计类，统计任务和百分比
 */
@Data
public class StatisticsField {
    private int num;

    private float percent;

    private String title;

    public StatisticsField(String title){
        this.title=title;
        percent=0;
        num=0;
    }


    public StatisticsField(){
        percent=0;
        num=0;
    }
    public void add(float per) {
        percent+=per;
        num++;
    }
    public float result(){
        return percent/num*100;
    }
}
